const prodPlugins = []
// 判断是发布阶段还是开发阶段
if (process.env.NODE_ENV === 'production') {
  prodPlugins.push('transform-remove-console')
}
module.exports = {
  presets: ["@vue/cli-plugin-babel/preset"],
  plugins: [
    [
      "module-resolver",
      {
        root: ["./src"],
        alias: {
          "@component": "./src/components",
          "@common": "./src/common",
          "@img": "./src/assets/img",
          "@css": "./src/assets/css",
        },
      },
    ],
    [
      "component",
      {
        libraryName: "element-ui",
        styleLibraryName: "theme-chalk",
      },
    ],
    ...prodPlugins,
    "@babel/plugin-syntax-dynamic-import"
  ],

}
